﻿@using Domain
@using WebUI.Areas.Admin.Models
@using WebUI.Extensions
@{
	Layout = null;

	AdminWebBaseInfoViewModel BaseInfo = ViewBag.AdminWebBaseInfo as AdminWebBaseInfoViewModel;
	BaseInfo = BaseInfo ?? new AdminWebBaseInfoViewModel();
	UserInfo CurrentUserInfo = ViewBag.CurrentUserInfo as UserInfo;

	IList<Sys_Menu> MenuList = ViewBag.MenuList as IList<Sys_Menu>;
}

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>@ViewBag.Title</title>
	@RenderSection("head", false)
</head>
<body class="hold-transition skin-blue sidebar-mini">
	<div class="wrapper">
		<!-- Main Header -->
		<header class="main-header">
			<!-- Logo -->
			<a href="index2.html" class="logo">
				<!-- mini logo for sidebar mini 50x50 pixels -->
				<span class="logo-mini">@Html.Raw(BaseInfo.Logo_mini)</span>
				<!-- logo for regular state and mobile devices -->
				<span class="logo-lg">@Html.Raw(BaseInfo.Logo_lg)</span>
			</a>
			<!-- Header Navbar -->
			<nav class="navbar navbar-static-top" role="navigation">
				<!-- Sidebar toggle button-->
				<a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
					<span class="sr-only">Toggle navigation</span>
				</a>
				<!-- Navbar Right Menu -->
				<div class="navbar-custom-menu">
					<ul class="nav navbar-nav">
						<!-- Messages: style can be found in dropdown.less-->
						<li class="dropdown messages-menu">
							<!-- Menu toggle button -->
							<a href="#" class="dropdown-toggle" data-toggle="dropdown">
								<i class="fa fa-envelope-o"></i>
								<span class="label label-success">4</span>
							</a>
							<ul class="dropdown-menu">
								<li class="header">You have 4 messages</li>
								<li>
									<!-- inner menu: contains the messages -->
									<ul class="menu">
										<li>
											<!-- start message -->
											<a href="#">
												<div class="pull-left">
													<!-- User Image -->
													<img src="@CurrentUserInfo.Avatar" class="img-circle" alt="User Image">
												</div>
												<!-- Message title and timestamp -->
												<h4>
													Support Team
													<small><i class="fa fa-clock-o"></i> 5 mins</small>
												</h4>
												<!-- The message -->
												<p>Why not buy a new awesome theme?</p>
											</a>
										</li>
										<!-- end message -->
									</ul>
									<!-- /.menu -->
								</li>
								<li class="footer"><a href="#">See All Messages</a></li>
							</ul>
						</li>
						<!-- /.messages-menu -->
						<!-- User Account Menu -->
						<li class="dropdown user user-menu">
							<!-- Menu Toggle Button -->
							<a href="#" class="dropdown-toggle" data-toggle="dropdown">
								<!-- The user image in the navbar-->
								<img src="@CurrentUserInfo.Avatar" class="user-image" alt="User Image">
								<!-- hidden-xs hides the username on small devices so only the image appears. -->
								<span class="hidden-xs">@CurrentUserInfo.Name</span>
							</a>
							<ul class="dropdown-menu">
								<!-- The user image in the menu -->
								<li class="user-header">
									<img src="@CurrentUserInfo.Avatar" class="img-circle" alt="User Image">
									<p>
										@CurrentUserInfo.Name - @CurrentUserInfo.RoleInfoList.FirstOrDefault().Name
										@*<small>Member since Nov. 2012</small>*@
										<small>加入自 @CurrentUserInfo.RegTime.ToRegTime()</small>
									</p>
								</li>
								<!-- Menu Body -->
								<li class="user-body">
									<div class="row">
										<div class="col-xs-4 text-center">
											<a href="#">Followers</a>
										</div>
										<div class="col-xs-4 text-center">
											<a href="#">Sales</a>
										</div>
										<div class="col-xs-4 text-center">
											<a href="#">Friends</a>
										</div>
									</div>
									<!-- /.row -->
								</li>
								<!-- Menu Footer-->
								<li class="user-footer">
									<div class="pull-left">
										<a href="@Url.Action("Index", "Profile", new { area = "Account", userName = CurrentUserInfo.UserName })" class="btn btn-default btn-flat" target="_blank">个人中心</a>
									</div>
									<div class="pull-right">
										<a href="@Url.Action("Exit", "Login", new { area = "Account", returnUrl = Url.Action("Index", "Login", new { area = "Account" }) })" class="btn btn-default btn-flat">退出</a>
									</div>
								</li>
							</ul>
						</li>
						<!-- Control Sidebar Toggle Button -->
						<li>
							<a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
						</li>
					</ul>
				</div>
			</nav>
		</header>
		<!-- Left side column. contains the logo and sidebar -->
		<aside class="main-sidebar">
			<!-- sidebar: style can be found in sidebar.less -->
			<section class="sidebar">
				<!-- Sidebar user panel (optional) -->
				<div class="user-panel">
					<div class="pull-left image">
						<img src="@CurrentUserInfo.Avatar" class="img-circle" alt="User Image">
					</div>
					<div class="pull-left info">
						<p>@CurrentUserInfo.Name</p>
						<!-- Status -->
						<a href="#"><i class="fa fa-circle text-success"></i> Online</a>
					</div>
				</div>
				<!-- search form (Optional) -->
				<form action="#" method="get" class="sidebar-form">
					<div class="input-group">
						<input type="text" name="q" class="form-control" placeholder="Search...">
						<span class="input-group-btn">
							<button type="submit" name="search" id="search-btn" class="btn btn-flat">
								<i class="fa fa-search"></i>
							</button>
						</span>
					</div>
				</form>
				<!-- /.search form -->
				<!-- Sidebar Menu -->
				@{ Html.RenderAction("LeftMenuPartial", new { area = "Admin" }); }
				<!-- /.sidebar-menu -->
			</section>
			<!-- /.sidebar -->
		</aside>
		<!-- Content Wrapper. Contains page content -->
		<div id="js-content-wrapper" class="content-wrapper">
			<div id="loading">
				<div id="loading-center">
					<div id="loading-center-absolute">
						<div class="object" id="object_one"></div>
						<div class="object" id="object_two"></div>
						<div class="object" id="object_three"></div>
						<div class="object" id="object_four"></div>
						<div class="object" id="object_five"></div>
						<div class="object" id="object_six"></div>
						<div class="object" id="object_seven"></div>
						<div class="object" id="object_eight"></div>
						<div class="object" id="object_nine"></div>
					</div>
				</div>
			</div>
			<iframe id="js-iframe-content" name="iframe-content" src="@Url.Action("Default", "Home", new { area = "Admin" })" frameborder="0" scrolling="yes" style="width: 100%; min-height: 600px;">内容主体区域</iframe>
		</div>
		<!-- /.content-wrapper -->
		<!-- Main Footer -->
		<footer class="main-footer">
			<!-- To the right -->
			<div class="pull-right hidden-xs">
				Anything you want
			</div>
			<!-- Default to the left -->
			@Html.Raw(BaseInfo.Copyright)
		</footer>
		<!-- Control Sidebar -->
		<aside class="control-sidebar control-sidebar-dark">
			<!-- Create the tabs -->
			<ul class="nav nav-tabs nav-justified control-sidebar-tabs">
				<li class="active"><a href="#control-sidebar-home-tab" data-toggle="tab"><i class="fa fa-home"></i></a></li>
				<li><a href="#control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-gears"></i></a></li>
			</ul>
			<!-- Tab panes -->
			<div class="tab-content">
				<!-- Home tab content -->
				<div class="tab-pane active" id="control-sidebar-home-tab">
					<h3 class="control-sidebar-heading">选择主题模板</h3>
					<ul class="control-sidebar-menu">
						@foreach (var item in BaseInfo.ThemeTemplateDic)
						{
							<li>
								<a onclick="selectTemplate(@item.Key)">
									<h4 class="control-sidebar-subheading"><i class="fa fa-th-large"></i> @item.Value</h4>
								</a>
							</li>
						}
					</ul>
					<!-- /.control-sidebar-menu -->
				</div>
				<!-- /.tab-pane -->
				<!-- Stats tab content -->
				<div class="tab-pane" id="control-sidebar-stats-tab">Stats Tab Content</div>
				<!-- /.tab-pane -->
				<!-- Settings tab content -->
				<div class="tab-pane" id="control-sidebar-settings-tab">
					<form method="post">
						<h3 class="control-sidebar-heading">General Settings</h3>
						<div class="form-group">
							<label class="control-sidebar-subheading">
								Report panel usage
								<input type="checkbox" class="pull-right" checked>
							</label>
							<p>
								Some information about this general settings option
							</p>
						</div>
						<!-- /.form-group -->
					</form>
				</div>
				<!-- /.tab-pane -->
			</div>
		</aside>
		<!-- /.control-sidebar -->
		<div class="control-sidebar-bg"></div>
	</div>
	<!-- ./wrapper -->
	<!-- REQUIRED JS SCRIPTS -->
	@RenderSection("body", false)
</body>
</html>